﻿CREATE TABLE [dbo].[EnterpriseAttribute] (
    [EnterpriseAttributeId]    INT          IDENTITY (1, 1) NOT NULL,
    [EnterpriseId]    INT          NOT NULL,
    [Key]            VARCHAR (100) NOT NULL,
    [Value]          VARCHAR (150) NULL,
    CONSTRAINT [PK_EnterpriseAttribute] PRIMARY KEY CLUSTERED ([EnterpriseAttributeId] ASC),
    CONSTRAINT [FK_Enterprise_Attribute] FOREIGN KEY ([EnterpriseId]) REFERENCES [dbo].[Enterprise] ([EnterpriseId])

);



GO

--CREATE INDEX [IX_EnterpriseAttribute_Key] ON [dbo].[EnterpriseAttribute] ([EnterpriseId], [Key])
